package com.cloud.pay.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.pay.dao.RefundDao;
import com.cloud.pay.entity.Refund;
import com.cloud.pay.service.RefundService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 退款表 服务实现类
 * </p>
 *
 * @author wenjin
 * @since 2019-12-12
 */
@Service
public class RefundServiceImpl extends ServiceImpl<RefundDao, Refund> implements RefundService {

    @Override
    public Refund getByTradeNo(String appId, String tradeNo) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq(Refund.APP_ID, appId);
        queryWrapper.eq(Refund.TRADE_NO, tradeNo);
        return this.getOne(queryWrapper);
    }
}
